# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Joaquim Monteiro <joaquim.monteiro@protonmail.com>

pkgname=mvt
pkgver=2.2.6
pkgrel=2
pkgdesc="Mobile Verification Toolkit, a forensics tool looking for signs of device compromise"
arch=(any)
url="https://github.com/mvt-project/mvt"
license=(custom:MVT)
depends=('libusb' 'python' 'python-adb-shell' 'python-appdirs' 'python-click' 'python-cryptography' 'python-iosbackup'
         'python-libusb1' 'python-packaging' 'python-rich' 'python-tld' 'python-tqdm' 'python-requests'
         'python-simplejson' 'python-yaml')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("mvt-${pkgver}.tar.gz::https://github.com/mvt-project/mvt/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('dabe651c164bf1d2b7f07355a9fa0baf4cab1573112a4617a8e784a92eee02e1ef20db2082ef696c64fdbaa9209d592089958f75f6a78258a0868e270bf902c4')
b2sums=('3b2cb7de119ca6474ab6d78900a08729f92512bde81d8cea440f2e3beb6ec720d2e3d4f888f93057b66e5cf4291e9a6c0c6744913b48e289a43323e836efadc5')

build() {
  cd "mvt-${pkgver}"
  python -m build -wn
}

package() {
  cd "mvt-${pkgver}"
  python -m installer -d "${pkgdir}" dist/*.whl
  install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  local _py3_ver=$(python --version | cut -d " " -f2)
  rm -rf "$pkgdir/usr/lib/python${_py3_ver%.*}/site-packages/tests"
}

# vim: ts=2 sw=2 et:
